package com.burges.net.function

import org.apache.flink.api.common.functions.MapFunction
import org.apache.flink.streaming.api.scala.{StreamExecutionEnvironment, _}

/**
  * 通过匿名方式创建Function接口
  * 创建人    BurgessLee 
  * 创建时间   2020/1/25 
  * 描述
  */
object FunctionInterfaceByAnonymousClass {

	def main(args: Array[String]): Unit = {
		val env = StreamExecutionEnvironment.getExecutionEnvironment
		val dataStream = env.fromElements("hello","world")
		dataStream.map(new MapFunction[String,String] {
			override def map(t : String) = {
				t.toUpperCase()
			}
		})
	}

}
